﻿using System.Data;
using System.Runtime.Serialization;
using System.ServiceModel;

namespace HRMService
{
    // NOTE: If you change the interface name "ITypeOfLeaveWork" here, you must also update the reference to "ITypeOfLeaveWork" in App.config.
    [ServiceContract(Namespace = "http://HRMService")]
    public interface ITypeOfLeaveWork
    {
        [OperationContract]
        int TypeOfLeaveWork_Using(int TypeOfLeaveWorkID);

        [OperationContract]
        DataSet TypeOfLeaveWork_GetAll();

        [OperationContract]
        DataSet TypeOfLeaveWork_GetByBranchCode(string _BranchCode);

        [OperationContract]
        TypeOfLeaveWorkInfo TypeOfLeaveWork_GetInfo(int TypeOfLeaveWorkID);

        [OperationContract]
        DataSet TypeOfLeaveWork_GetList(out int ItemCount, int currentPage, int pageSize, string _BranchCode);

        [OperationContract]
        int TypeOfLeaveWork_Insert(TypeOfLeaveWorkInfo eInfo);

        [OperationContract]
        bool TypeOfLeaveWork_Update(TypeOfLeaveWorkInfo eInfo);

        [OperationContract]
        bool TypeOfLeaveWork_Delete(int TypeOfLeaveWorkID);
    }

    [DataContract(Namespace = "http://HRMService")]
    public class TypeOfLeaveWorkInfo
    {
        int _ID;
        [DataMember]
        public int ID
        {
            get { return _ID; }
            set { _ID = value; }
        }
        string _Name;
        [DataMember]
        public string Name
        {
            get { return _Name; }
            set { _Name = value; }
        }
        string _Code;

        [DataMember]
        public string Code
        {
            get { return _Code; }
            set { _Code = value; }
        }
        string _BranchCode;
        [DataMember]
        public string BranchCode
        {
            get { return _BranchCode; }
            set { _BranchCode = value; }
        }
    }
}
